package internal

import (
	"CaptchaCluster/server/base"
	"CaptchaCluster/server/game/nginx"
	"github.com/name5566/leaf/module"
)

var (
	skeleton = base.NewSkeleton()
	ChanRPC  = skeleton.ChanRPCServer
)

type Module struct {
	*module.Skeleton
}

func (m *Module) OnInit() {
	m.Skeleton = skeleton

	nginx.WriteConf(nil)
	nginx.Start()
}

func (m *Module) OnDestroy() {
	nginx.Stop()
}
